package component;

import Main.Main;
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import org.fife.ui.rtextarea.Gutter;
import org.fife.ui.rtextarea.RTextScrollPane;



/**
 * @author zhongwen
 * @description 可编写Java源程序的面板
 * @date 2021-12-22 16:05
 */
public class JavaEditorPane extends RTextScrollPane {


    public JavaEditorPane(RSyntaxTextArea javaTextArea) {
        super(javaTextArea);
        this.setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_ALWAYS);
        this.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_ALWAYS);
        javaTextArea.setFont(Main.configurationBean.getFont());
        Gutter gutter = this.getGutter();
        gutter.setLineNumberFont(Main.configurationBean.getFont());
    }
}
